package com.kecheng.servermonitor.entity;

import lombok.Data;
import lombok.Getter;

/**
 * 磁盘使用对象
 */
@Data
@Getter
public class DiskUsage {
    // 盘符
    private String path;
    // 磁盘总容量
    private Long totalSpace;
    // 磁盘剩余容量
    private Long freeSpace;
    // 磁盘使用率
    private Long usagePercent;

    public DiskUsage(String absolutePath, Long totalSpace, Long freeSpace, Long usagePercent) {
        this.path = absolutePath;
        this.totalSpace = totalSpace;
        this.freeSpace = freeSpace;
        this.usagePercent = usagePercent;
    }

    @Override
    public String toString() {
        return "DiskInfo{" +
                "path='" + path + '\'' + ",usagePercent=" + usagePercent + "}";
    }
}
